package com.example.androidstudy.activity;

import com.example.androidstudy.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class DialogMainActivity extends Activity implements OnClickListener {
	final static String TAG = "DialogMainActivity";
			
	Button button;
	Intent intent;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.dialog_main);
		button = (Button) findViewById(R.id.bt_custom_dialog);
		button.setOnClickListener(this);
	}

	@Override
	protected void onDestroy() {
		super.onDestroy();
		finish();
		
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.bt_custom_dialog:
			intent = new Intent(DialogMainActivity.this, CustomDialogActivity.class);
			startActivity(intent);
			break;

		default:
			break;
		}
	}

}
